home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 19
/
Aminet 19 (1997)(GTI - Schatztruhe)[!][Jun 1997].iso
/
Aminet
/
comm
/
cnet
/
time_clock.lha
/
timerclock
/
TimeClockE
< prev
next >
Wrap
Text File
|
1997-03-13
|
8KB
|
125 lines
/**************************************************************************\
$VER: TimeClock Extension, v2.00 (14-Mar-97) by Dotoran of Frontiers!
\**************************************************************************/
options results;signal on SYNTAX;signal on ERROR;signal on IOERR
a=sourceline(2);parse var a . ", "ver" ("vdate")" .
tr=transmit;se=sendstring;gc=getchar;gu=getuser
a="rexxsupport.library";if ~show("l",a) then if ~addlib(a,0,-30) then exit
parse source . . fp .;df=left(fp,max(lastpos('/',fp),lastpos(':',fp)))
parse arg arg ; gu 1109799 ; quick=result ; gu 1100453 ; tf=result
if quick then do;setobject "0";putuser 1109799;end
if arg>"" then tr "n1cbTime Clock ceExtensionsc9:"
path=df;gu 23;port=result;gu 40;id=result
if arg="C" then do;a="C";signal CDTIMER;end
if arg="T" then do;a="T";signal TDTIMER;end
se "n1c6Set c7<cbCc7>cbountc6-cbDown c9Timerc6, c7<caTc7>caimec6-caOfc6-caDay c9Timerc6, or cf[cdQUITcf]c9: "
gc;a=result;if index("CT",a)=0 then do ; tr "cdQuit" ; exit ; end
CDTIMER:
if a="C" then do ; tr "cbCountc6-cbDown c9Timer";tc=getclip("CDtimer"id)
if tc>"" then do ; parse var tc v1 v2 v3 v4 v5 v;v6=strip(v)
tr "n1 c6You already have a cd`cbcount downcd' c9timer c6set:n1"
tr "Cr1cb Set Forr0c9: ce"v5" c6minutes.";if v6="" then v6="c9Not c6defined."
tr "Cr1cb Set Atr0c9: ca"v4
se "Cr1cbReminderr0c9: cd"v6"n2c6Want to c9cancel c6this timer? c7[caNoc7]c9: ca"
gc;a=result;if a="Y" then do;tr "Yes";call setclip("CDtimer"id)
tr "n1c6Your cd`cbcount downcd' c9timer c6setting has been cccanceledc6!"
a="C";signal CDTIMER2;end
tr "No.";exit;end
gu 7 ; ti=result%10 ; if quick then signal CDTIMER2
se "n1caView ceHelp c6now? c7[caNoc7]c9: ca";gc;a=result
if a="Y" then do ; tr "Yes"
se "n1 c6You have ca"ti" minutes c6remaining this call. It is possible for "
se "you to create a c9timer c6which can cd`cbcount downcd' c6a specified number of "
se "minutes. For instance, if you're going to dinner in cf1/2 c6an hour, you "
se "can set a cd`cbcount downcd' c9timer c6for ce25 minutesc6. You then go about your "
se "business, and at the c9end c6of the ce25 minute c6period, a cfSystem OnLine "
se "Message c6(also referred to as an cfOLMc6) will be sent to you alerting you "
se "that the specified time has elapsed. Additionally, you can supply a "
tr "line of cd`caremindercd' c6text which will caALSO c6appear in the cfOLMc6.n1"
se "c6 The c9timer c6will caremain activec6, even if you c9lose carrier c6or celog offc6. "
se "If you logon to cfANY c6port before the c9timer c6has cd`catimed-outcd' c6you'll still "
se "be alerted that the c9timer c6has gone off. Remember, however, that the "
se "timer uses cfOLM's c6to alert you. There are areas within the bbs that "
se "c9restrict c6an cfOLM's c6ability to display, until such a time as you leave "
se "that area. For instance, many of the online games, like cbWheel of "
se "Fortunec6, can cfMUFFLE c6ports, which means you will c9NOT c6be shown cfOLM's "
tr "c6for the amount of time spent inside the game." ; end
else tr "No"
CDTIMER2:
gu 7 ; ti=result%10
se "n1c6Set cd`cbCount-Downcd' c9timer c6for how many minutes? c7(ce1c7-ce"ti"c7/cf[cdQuitcf]c7)c9: cesI0 3}"
gu 70;tl=result;if tl<1 | tl>ti then do;tr "ucdQuit";exit;end
tr "n1caCreate c6reminder text below. c7(c6Press cbENTERc7/cbRETURN c6to c9NOT c6create reminderc7)c9:"
se "cf> car1I0 77}r0";gu 70;rt=result;if rt="" then tr "n1c9No c6reminder text will be used."
tr "n1 c6In ca"tl" minutesc6, I'll send you an cfOLMc6. cbThanks c6for using c9Timerc6!"
timer=port" "id" 1 "left(time("n"),5)" "tl" "rt
call setclip("CDtimer"id,timer);signal START
end
TDTIMER:
if a="T" then do ; tr "caTimec6-caOfc6-caDay c9Timer";tc=getclip("TDtimer"id)
if tc>"" then do ; parse var tc v1 v2 v3 v4 v5 v;v6=strip(v)
tr "n1 c6You already have a cd`catime of daycd' c9timer c6set:n1"
t=left(v5,2)":"right(v5,2);if length(v5)=3 then t=left(v5,1)":"right(v5,2)
tr "Cr1ca Set Forr0c9: ce"t;if v6="" then v6="c9Not c6defined."
tr "Cr1ca Set Atr0c9: ca"v4
se "Cr1caReminderr0c9: cd"v6"n2c6Want to c9cancel c6this timer? c7[caNoc7]c9: ca";gc
a=result;if a="Y" then do;tr "Yes";call setclip("TDtimer"id)
tr "n1c6Your cd`catime of daycd' c9timer c6setting has been c9canceledc6!"
a="T";signal TDTIMER2;end
tr "No.";exit;end
gu 7 ; ti=result%10 ; if quick then signal TDTIMER2
se "n1caView ceHelp c6now? c7[ceNoc7]c9: ce";gc;a=result
if a="Y" then do ; tr "Yes"
se "@4n1 c6It is now ca"left(time("n"),5)"c6. I can alert you when the "
se "specified cd`catime of daycd' c6has occurred. For instance, if you logon "
se "at cf1:00PMc6, but need to mow the lawn at cf1:30PMc6, you can have this "
se "c9timer c6alert you when cf1:30PM c6comes alongc7(c6just like an c9alarm clockc6!c7)c6. "
se "You can additionally create a cd`cbremindercd' c6text, which will also "
se "appear in the cfOLM c7(cfOn Line Messagec7) c6that is used to alert you the "
tr "specified time has come.n1"
se "c6 The c9timer c6will caremain activec6, even if you c9lose carrier c6or celog offc6. "
se "If you logon to cfANY c6port before the c9timer c6has cd`catimed-outcd' c6you'll still "
se "be alerted that the c9timer c6has gone off. Remember, however, that the "
se "timer uses cfOLM's c6to alert you. There are areas within the bbs that "
se "c9restrict c6an cfOLM's c6ability to display, until such a time as you leave "
se "that area. For instance, many of the online games, like cbWheel of "
se "Fortunec6, can cfMUFFLE c6ports, which means you will c9NOT c6be shown cfOLM's "
tr "c6for the amount of time spent inside the game.n1"
if ~tf then do
tr "ca13:00 - 1 PM 16:00 - 4PM 19:00 - 7PM 22:00 - 10PM"
tr "cd14:00 - 2 PM 17:00 - 5PM 20:00 - 8PM 23:00 - 11PM"
tr "ca15:00 - 3 PM 18:00 - 6PM 21:00 - 9PM 00:00 - 12AM (Midnight)"
end
end
else tr "No"
TDTIMER2:
se "n1c6It is now ca"left(time("n"),5)"c6. c6Using cf24-Hour c6time format, set the cd`caTimec6-caOfc6-caDaycd' c6timer to alert "
se "you at what time? c7(ce00:00c7-ce23:59c7/cf[cdQuitcf]c7)c9: cesI0 5}";gu 70;tl=compress(result,":")
if tl<"0000" | tl>"2359" then do ; tr "ucdQuit" ; exit ; end
tr "n1caCreate c6reminder text below. c7(c6Press caENTERc7/caRETURN c6to c9NOT c6create reminderc7)c9:"
se "cf> cbr1I0 77}r0";gu 70;rt=result;if rt="" then tr "n1c9No c6reminder text will be used."
t=left(tl,2)":"right(tl,2);if length(tl)=3 then t=left(tl,1)":"right(tl,2)
tr "n1 c6At ca"t"c6, I'll send you an cfOLMc6. cbThanks c6for using c9Timerc6!"
timer=port" "id" 2 "left(time("n"),5)" "tl" "rt
call setclip("TDtimer"id,timer);signal START
end
START:
address command "run >nil: rx "path"TimeClockT "timer
exit
CHECK:;if ARG() & ARG(1)~="###PANIC" then return ARG(1)
getcarrier;if result="TRUE" then if ARG() then return ARG(1);else return
logentry "Lost Carrier!!";bufferflush;exit
SYNTAX:;ERROR:;IOERR:;e1="n1 Error: "rc" ("errortext(rc)")"
e2=" Line: "left(sigl,4)"File:";c="`"fp", "ver"'";e2=e2" "c;tr e1;tr e2
logentry e1;logentry e2;e=strip(translate(sourceline(sigl),"\{",""))
do while e~="";e3="Source: "left(e,37);tr e3;logentry e3;e=substr(e,38);end
bufferflush
/**************************************************************************\
\****************************************** Frontiers BBS (716)/823-9892 **/